﻿<%@ Page Title="" Language="C#" AutoEventWireup="true" CodeFile="Receipt.aspx.cs"
    Inherits="Receipt" %>

<html>
<head>
    <title></title>
    <style type="text/css">
        @font-face
        {
            font-family: CustomFont;
            src: url('./Styles/fre3of9x.ttf');
        }

        .barcode
        {
            font-family: CustomFont;
            font-size: 24pt;
        }

        .Receipt
        {
            font-size: 12pt;
            margin: 10px;
        }

            .Receipt tr
            {
                margin: 10px;
                padding: 10px;
            }

                .Receipt tr td
                {
                    margin: 10px;
                    padding: 5px;
                }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div id="divContent" runat="server">
        <asp:DataList ID="dlPackageDetail" runat="server" Width="100%">
            <ItemTemplate>
                <table class="Receipt">
                    <tr>
                        <td>
                            <h2>Customer Info</h2>
                        </td>
                    </tr>
                    <tr>
                        <td>From:
                        </td>
                        <td>
                            <asp:Label ID="Label1" runat="server" Text='<%# Eval("Sender") %>'></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>Address:
                        </td>
                        <td>
                            <span class="right">
                                <asp:Label ID="Label4" runat="server" Text='<%# Eval("SenderLocation") %>'></asp:Label></span>
                        </td>
                    </tr>
                    <tr>
                        <td></td>
                    </tr>
                    <tr>
                        <td>To:
                        </td>
                        <td>
                            <asp:Label ID="Label8" runat="server" Text='<%# Eval("Receiver") %>'></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>Address:
                        </td>
                        <td>
                            <span class="right">
                                <asp:Label ID="Label3" runat="server" Text='<%# Eval("ReceiverLocation") %>'></asp:Label></span>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <h2>Packge Info</h2>
                        </td>
                    </tr>
                    <tr>
                        <td>Weight:
                        </td>
                        <td>
                            <span class="right">
                                <asp:Label ID="Label2" runat="server" Text='<%# String.Format("{0:##.00} Kg", Eval("Weight")) %>'></asp:Label></span>
                        </td>
                    </tr>
                    <tr>
                        <td>Price:
                        </td>
                        <td>
                            <span class="right">
                                <asp:Label ID="txtPrice" runat="server" Text='<%# String.Format("${0:##.00}",Eval("Price")) %>'></asp:Label></span>
                        </td>
                    </tr>
                    <tr>
                        <td>Package Type:
                        </td>
                        <td>
                            <span class="right">
                                <asp:Label ID="Label7" runat="server" Text='<%# Eval("ParcelType") %>'></asp:Label></span>
                        </td>
                    </tr>
                    <tr>
                        <td>Fragile:
                        </td>
                        <td>
                            <span class="right">
                                <asp:Label ID="Label5" runat="server" Text='<%# Eval("Fragile") %>'></asp:Label></span>
                        </td>
                    </tr>
                    <tr>
                        <td>Status:
                        </td>
                        <td>
                            <span class="right">
                                <asp:Label ID="Label6" runat="server" Text='<%# Eval("Status") %>'></asp:Label></span>
                        </td>
                    </tr>

                    <tr>
                        <td>Reference Number:
                        </td>
                        <td>
                            <%--<asp:Label ID="Label9" runat="server" Font-Names="'Free 3 of 9 Extended'" CssClass="barcode"
                                Font-Size="50pt" Text='<%# Eval("Barcode") %>'></asp:Label>--%>
                            <asp:Image ID="Image1" runat="server" ImageUrl='<%# String.Format("BarCode.aspx?code={0}&mu=40",Eval("Barcode")) %>'></asp:Image>
                            <br />
                            <asp:Label style="margin-left:10px;" ID="Label10" runat="server" Text='<%# Eval("Barcode") %>'></asp:Label>

                        </td>
                    </tr>
                </table>
            </ItemTemplate>
            <ItemStyle Width="100%" BorderStyle="Solid" />
        </asp:DataList>
        <hr />
        <h4>*Please print this receipt and go to office counter with your parcel for the next
            processing</h4>
        <h4></h4>
    </div>
    <asp:Button ID="btnPrint" runat="server" Text="Print Recipt" OnClick="btnPrint_Click"
        Style="margin: 20px;" OnClientClick="window.print();return false;" />
    </form>
</body>
</html>
